<html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
        <meta name="msapplication-tap-highlight" content="no" />
        <title>Full Screen Example</title>
        
        <style type="text/css">
        body, html
        {
        	margin: 4px;
        	padding: 0;
        	position: relative;
        }
        
        button
        {
			display: block;
        	width: 100%;
        	height: 42px;
        	margin-bottom: 4px;
        	font-size: 18px;
        }
        </style>
        
    </head>
    
    <body>
    
        <h1>Android 4.0+</h1>
		<button id="leanModeButton">Lean Mode</button>
		<button id="showUiButton">Show UI</button>
		
        <h1>Android 4.4+</h1>
		<button id="immersiveModeButton">Immersive Mode</button>
		<button id="showUnderUiButton">Show Under UI</button>
        
        <script type="text/javascript" src="cordova.js"></script>
        
        <script type="text/javascript">
        
            document.addEventListener('deviceready', function(event) 
            {
            	var leanModeButton = document.getElementById('leanModeButton'),
					immersiveModeButton = document.getElementById('immersiveModeButton'),
            		showUnderUiButton = document.getElementById('showUnderUiButton'),
            		showUiButton = document.getElementById('showUiButton');
            	
            	function successFunction()
            	{
            	    console.log("It worked!");
            	}

            	function errorFunction(error)
            	{
            	    console.log(error);
            	}
				
            	function trace(value)
            	{
            	    console.log(value);
            	}
            	
            	leanModeButton.addEventListener('click', function(event)
            	{
            		AndroidFullScreen.leanMode(successFunction, errorFunction);
            	});
            	
            	immersiveModeButton.addEventListener('click', function(event)
            	{
            		AndroidFullScreen.immersiveMode(successFunction, errorFunction);
            	});
            	
            	showUnderUiButton.addEventListener('click', function(event)
             	{
             		AndroidFullScreen.showUnderSystemUI(successFunction, errorFunction);
             	});
            	
            	showUiButton.addEventListener('click', function(event)
             	{
             		AndroidFullScreen.showSystemUI(successFunction, errorFunction);
             	});
            	
            });
            
        </script>
    </body>
</html>
